x86/hvm: scale host TSC when setting/getting guest TSC
authorHaozhong Zhang <haozhong.zhang@intel.com>
Tue, 19 Jan 2016 15:07:15 +0000 (16:07 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 19 Jan 2016 15:07:15 +0000 (16:07 +0100)
commit52fd9a46f6e9eb050a6b402ce3b04fa57907acc5
treedac93e820636b55cdf80cb4c56ba397c11df672b
parentc2ba8c24f34426c993afa841bf94d933d2461cd9
x86/hvm: scale host TSC when setting/getting guest TSC

The existing hvm_[set|get]_guest_tsc_fixed() calculate the guest TSC by
adding the TSC offset to the host TSC. When the TSC scaling is enabled,
the host TSC should be scaled first. This patch adds the scaling logic
to those two functions.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/svm.c
xen/include/asm-x86/hvm/hvm.h